package com.zzg.demo.laboratory.circulardependencies;

import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;

@Service
public class TestServiceC {
    // setter注入
    private TestServiveA testServiveA;

    @Resource
    public void setTestServiveA(TestServiveA testServiveA) {
        this.testServiveA = testServiveA;
    }

    @GetMapping
    public String testC(){
        String testC = "testC";
        System.out.println(testC);
        String s = testServiveA.testA();
        System.out.println(s);
        return testC;
    }
}
